<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>跳转提示</title>
    <style type="text/css">
        body {
            color: #333;
            font: 14px Verdana, "Helvetica Neue", helvetica, Arial, 'Microsoft YaHei', sans-serif;
            margin: 0;
            padding: 0 20px 20px;
            word-break: break-word;
            background: #fff;
        }

        #pc {
            text-align: center;
            margin-top: calc(50vh - 150px);
        }

        #pc img {
            height: 80px;
        }

        #pc .desc {
            margin: 20px;
        }

        #pc .desc #title {
            color: #6e6e6e;
            font-size: 20px;
        }

        #pc .btn a {
            color: #5EBCFF;
            border: solid 1px #5EBCFF;
            border-radius: 3px;
            background: none;
            padding: 5px 10px;
            cursor: pointer;
            font-size: 14px;
            text-decoration: none;
        }
    </style>
</head>
<body>
<div id="pc">
    <div class="img">
        <img src="/static/images/jump_1.png"/>
    </div>
    <div class="desc">
        <div id="title">为了您更好的体验，页面即将在浏览器中打开</div>
    </div>
    <div class="btn">
        <a id="reopen" href="javascript:;" onclick="openInBrowser();">立即打开</a>
        <a id="copy" data-clipboard-text="<?php echo($url);?>" href="javascript:;">复制链接</a>
    </div>
</div>
<script src="https://g.alicdn.com/dingding/dingtalk-pc-api/2.7.0/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script>

<script type="text/javascript">
    (function () {
        openInBrowser();
    })();

    function openInBrowser() {
        DingTalkPC.biz.util.openLink({
            url: "<?php echo($url);?>",
            onSuccess: function (result) {
                document.getElementById("title").innerHTML = "页面已经成功在浏览器中打开";
            },
            onFail: function () {
            }
        });
    }
</script>

<script>
    var clipboard = new ClipboardJS('#copy');
    clipboard.on('success', function (e) {
        DingTalkPC.device.notification.alert({
            message: "链接地址已经成功复制到粘贴板：<?php echo($url);?>",
            title: "复制成功",//可传空
            buttonName: "关闭",
            onSuccess: function () {
                /*回调*/
            },
            onFail: function (err) {
            }
        });
    });
    clipboard.on('error', function (e) {
        DingTalkPC.device.notification.alert({
            message: "请手动复制到粘贴板进行打开：<?php echo($url);?>",
            title: "复制失败",//可传空
            buttonName: "关闭",
            onSuccess: function () {
                /*回调*/
            },
            onFail: function (err) {
            }
        });
    });
</script>

</body>
</html>